<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets the modules currently being logged</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongolog.getlevel.html">MongoLog::getLevel</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongolog.setcallback.html">MongoLog::setCallback</a></div>
 <div class="up"><a href="class.mongolog.html">MongoLog</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongolog.getmodule" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoLog::getModule</h1>
  <p class="verinfo">(PECL mongo &gt;= 1.2.3)</p><p class="refpurpose"><span class="refname">MongoLog::getModule</span> &mdash; <span class="dc-title">Gets the modules currently being logged</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongolog.getmodule-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">int</span> <span class="methodname"><strong>MongoLog::getModule</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   This function can be used to see which parts of the driver&#039;s functionality
   are being logged.  Use the constants described in the
   <a href="class.mongolog.html" class="classname">MongoLog</a> section with bitwise operators to check if
   specific modules are being logged.
  </p>
  <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">getModule</span><span style="color: #007700">()&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">RS</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"logging&nbsp;replica&nbsp;sets\n"</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;(</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">getModule</span><span style="color: #007700">()&nbsp;^&nbsp;</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">NONE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"logging&nbsp;something\n"</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;((</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">getModule</span><span style="color: #007700">()&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">MongoLog</span><span style="color: #007700">::</span><span style="color: #0000BB">IO</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"not&nbsp;logging&nbsp;io\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
  </div>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongolog.getmodule-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongolog.getmodule-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the modules currently being logged.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongolog.getlevel.html">MongoLog::getLevel</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongolog.setcallback.html">MongoLog::setCallback</a></div>
 <div class="up"><a href="class.mongolog.html">MongoLog</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
